/*
 * Vertex.h
 *
 *  Created on: 15/09/2009
 *      Author: mario
 */

#ifndef VERTEX_H_
#define VERTEX_H_

#include "List.h"
#include "Edge.h"
#include "EdgeNode.h"
#include <iostream>
#include "Constants.h"
using std::string;

class Vertex {
private:
	string id;
	List* edgesList;
	float x;
	float y;
public:
	/**
	 * Constructors & destructors
	 */
	Vertex(string id, float x, float y);
	virtual ~Vertex();

	/**
	 *	Get id value
	 */
    string getId() const;
    /**
     *	Set id value
     */
    void setId(string id);
    /**
     *	Get edgeList
     */
    List* getEdgesList() const;
    /**
     *	set edgeList
     */
    void setEdgesList(List* edgesList);
    /**
     *	Get x value
     */
    float getX() const;
    /**
     *	Set x value
     */
    void setX(float x);
    /**
     *	Get y value
     */
    float getY() const;
    /**
     *	Set y value
     */
    void setY(float y);

    /**
     * Creates an edge from the vertex
     */
    int createEdge(string id, string idFrom, string idTo, float length, float maxVel);
    
    /**
     * Gets the Edge with the specified ID from the Edge's List 
     */
    Edge* getEdge(string id);
};

#endif /* VERTEX_H_ */
